1. Field of the Invention
The present invention relates generally to storing data in a disk drive attached with a computer. More particularly, the invention relates to storing and accessing streaming and non-streaming data in disk locations of common memory space of the disk drive.
2. Background Information
A computer having an attached disk drive, such as a magnetic hard disk drive, employs a number of different types of computer programs that cooperate in processes involving accesses to the disk drive. These types include application programs such as word processor or spreadsheet programs, operating systems such as DOS, Windows, Unix, or Linux and device drivers. A chain of events leading to the writing of data to, or the reading of data from, a disk drive starts with an application program making a function call for a read/write action, and then issuing a file system service request to the operating system.
A typical operating system handles input/output (I/O) requests for stream data using the same procedure associated with I/O requests for non-stream data. Stream data can represent items of a temporal nature such as audio visual (A/V) data or musical data. Stream data can also represent other inherently linear sequential data structures. An inherently linear data structure is one which requires sequential access by its nature; that is, the data structure cannot be reasonably processed or reconstructed if accessed in a non-sequential order. This is in contrast to non-stream data which can be accessed randomly for processing or reconstruction with no inherent access order dependency.
More recently, proposals have been developed to accommodate the handling of I/O requests for stream data differently than the manner by which I/O requests for non-stream data are handled. For example, a document identified as xe2x80x9cT13/D99128 revision 0xe2x80x9d entitled xe2x80x9cProposal For Audio/Visual Feature Setxe2x80x9d available from Western Digital Corporation of Irvine, California and a document identified as xe2x80x9cT13D99123 revision 1xe2x80x9d entitled xe2x80x9cProposal For Streaming AV Commandsxe2x80x9d available from Seagate Technology of Longmont, CO., describe proposals for handling the storage of stream and non-stream data. These proposals describe using multiple modes of operation, whereby a disk drive is placed into one set mode or configuration for I/O of stream data, and into other set mode or configuration for I/O of non-stream data.
In contrast to conventional I/O commands used to cause data transfers involving read or write actions, set configuration commands cause a change of conditions to affect the way that later I/O commands are performed until a subsequent reconfiguration command is generated. In the proposals for handling I/O of stream and non-stream data, set configuration commands are used to place a disk drive into a non-stream mode of operation or into a stream mode of operation. Before a read/write operation can be executed, the host operating system causes the drive to operate in the appropriate mode for either a stream operation or a non-stream operation. Requests associated with reading/writing non-stream data are handled using a drive mode that results in the data being stored on the disk drive in conventional fashion, without observing any specified rate at which the data is written to or read from memory. For example, an application program request to load application software (such as a spreadsheet program) into a disk drive involves writing non-stream, asynchronous data, which has no associated temporal requirements. This write operation can be executed between the host computer and the disk drive without satisfying any specified data rate constraint. The non-stream data is typically stored in a partitioned area of memory dedicated to non-stream data.
In contrast, application program requests which involve stream data are executed using a drive mode which ensures that associated temporal requirements of the data will be honored when the stream data is written to or read from the disk drive. The I/O requests between the host computer and the disk drive which are associated with a particular data stream occur consecutively, at regular intervals, so that the continuity of the stream can be preserved. The data is stored on the disk using a mode of operation which will ensure that the data rate constraint can be honored during subsequent reading of the data. The data is typically stored on the disk in a partitioned area, different from the area dedicated to non-stream data.
The use of different disk drive configurations, or modes, for stream data versus non-stream data, is due to an assumption that disk drives cannot freely mix streaming and non-streaming operations. On the other hand, mode switching is inefficient and may require processing in the disk drive which impacts performance. In addition, the storage of non-stream data and stream data in different, dedicated areas of memory so that data rate constraints (i.e., latency requirements) of the stream data can be honored results in inefficient use of the available memory space on the disk. For example, the space allocated to streaming data may fill-up, and result in an indication that subsequent streaming data can not be stored and accessed in compliance with a desired minimum latency, even though the space used for non-stream data is completely vacant.
Accordingly, it would be desirable to develop a method for processing file system service requests which involve non-stream data and stream data, wherein the use of set mode configuration commands can be avoided. In so doing, it would be desirable if the method could be easily integrated with conventional operating systems so that requests for both non-stream and stream data between a host computer and an attached disk drive can be executed without modification to existing file systems. It would also be desirable to store streaming data, along with non-streaming data, in common memory space wherein latency requirements of the streaming data can be satisfied without having to dedicate portions of the memory space among stream data and non-stream data in advance.
The invention is directed to a method for storing streaming and non-streaming data in dynamically allocated, common memory space of a data storage device comprising: organizing addressable locations of a data storage in a logical sequence; and initially storing streaming data by accessing the logical sequence of addressable locations in a first direction, and for storing non-streaming data by accessing the logical sequence of addressable locations in a second direction which is opposite the first direction.
This invention is also directed to an apparatus for storing streaming and non-streaming data in common memory space of a data storage device. The apparatus includes a data storage for storing data, the data storage having a plurality of addressable locations organized in a logical sequence; and a controller for initially storing streaming data by accessing the logical sequence of addressable locations in a first direction, and for storing non-streaming data by accessing the logical sequence of addressable locations in a second direction which is opposite the first direction.
Exemplary embodiments include dynamically allocating the logical sequence of addressable locations among streaming and non-streaming data, and reallocating a first set of addressable locations allocated to non-streaming data as addressable locations allocated to streaming data by linking said first set of addressable locations to comply with a latency requirement
Exemplary embodiments respond to file system service requests for stream data or for non-stream data without a need for set mode configuration commands, in a manner as described in commonly assigned, co-pending U.S. application Ser. No. 09/515,275 (Attorney Docket No. K35A0561), entitled xe2x80x9cMETHOD FOR PROCESSING FILE SYSTEM SERVICE REQUESTS IN A COMPUTER HAVING AN ATTACHED DISK DRIVE THAT CAN REPRODUCE STREAM DATA AND NON-STREAM DATAxe2x80x9d, filed Feb. 29, 2000, the contents of which are hereby incorporated by reference in their entirety. For example, to accommodate legacy applications, the step of responding to a file system service request associated with an application program""s function call can include intercepting the file system service request, and determining whether the file system service request is for stream data or non-stream data. The file system service request can specify parameters that identify the file system service request as a stream request. An application program interface (API) can be configured as an operating system extension, or xe2x80x9cshimxe2x80x9d in a manner as described in the co-pending application, to intercept and distinguish file system service requests identified as stream requests.
Where the shim intercepts all file systems service requests, it can also record whether the request is for non-stream data. A record can be created as a single data structure accessed by a disk device driver to issue stream access commands or non-stream access commands to the disk drive. The disk device driver can issue stream access commands, using for example, a stream pointer and the number of logical blocks included in the stream.
In exemplary embodiments, the addressable locations of the disk drive can be mapped from a logical space of the file system into a physical space of the disk drive using a linked list. The mapping can be performed within the disk drive using logical block addresses obtained from the file system using contents from the record.
According to exemplary embodiments, the data storage device is included in a disk drive attached to a computer, and the controller used to dynamically allocate and/or reallocate the logical sequence of addressable locations among streaming and non-streaming data is included on the disk drive.